#ifndef PLATFORM_H
#define	PLATFORM_H

#include "Exceptions.h"

struct Platform {
    
    struct Buffer {
        virtual void write(void* values, size_t offset, size_t count) = 0;
        virtual void read(void* values, size_t offset, size_t count) = 0;
        virtual ~Buffer() { }
    };
    
    virtual void ssytrd(char *uplo, int *n, Buffer* a, int *lda, 
	Buffer* d, Buffer* e, Buffer* tau, Buffer* work, int *lwork, int *
	info, size_t uplo_len) = 0;
    
    virtual void saxpy(int *n, float *sa, Buffer* sx, int *incx, Buffer* sy, int *incy) = 0;
    
    virtual float sdot(int *n, Buffer* sx, int *incx, Buffer* sy, int *incy) = 0;
    
    virtual void sgemv(char *trans, int *m, int *n, float *alpha, 
	Buffer* a, int *lda, Buffer* x, int *incx, float *beta, Buffer* y, 
	int *incy, size_t trans_len) = 0;
    
    virtual void slarfg(int *n, float *alpha, Buffer* x, int *incx, float *tau) = 0;
    
    virtual void slatrd(char *uplo, int *n, int *nb, Buffer* a, 
	int *lda, Buffer* e, Buffer* tau, Buffer* w, int *ldw, size_t uplo_len) = 0;
    
    virtual int sscal(int *n, float *sa, Buffer* sx, int *incx) = 0;
    
    virtual void ssymv(char *uplo, int *n, float *alpha, Buffer* a, 
	int *lda, Buffer* x, int *incx, float *beta, Buffer* y, int *
	incy, size_t uplo_len) = 0;
    
    virtual void ssyr2(char *uplo, int *n, float *alpha, Buffer* x, 
	int *incx, Buffer* y, int *incy, Buffer* a, int *lda) = 0;
    
    virtual void ssyr2k(char *uplo, char *trans, int *n, int *k, 
	float *alpha, Buffer* a, int *lda, Buffer* b, int *ldb, float *beta, 
	 Buffer* c, int *ldc) = 0;
    
    virtual int ssytd2(char *uplo, int *n, Buffer* a, int *lda, 
	Buffer* d, Buffer* e, Buffer* tau, int *info) = 0;
    
    virtual ~Platform() { }
};

#endif	/* PLATFORM_H */

